;; Example demonstrating begin functionality

;; Simple begin with multiple expressions
(begin 1 2 3)

;; Begin with definitions
(begin 
  (define x 10)
  (define y 20)
  (+ x y))

;; Begin with side effects
(begin
  (define counter 0)
  (set! counter (+ counter 1))
  (set! counter (+ counter 1))
  counter)

;; Empty begin
(begin)

;; Begin with procedure definitions
(begin
  (define (square x) (* x x))
  (define (cube x) (* x x x))
  (square 5))